<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<meta content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0;" name="viewport;">
<meta content="user-scalable=no" name="viewport">
<title>至富通</title>
                                 
<link href="http://__CSS__/my-style.css" rel="stylesheet" type="text/css">
<link rel="icon" href="http://__IMG__/favicon.ico">
</head> 
<body style="background-color:#e9e7e7; padding:10px 10px 10px 10px;">
   <script type="text/javascript">
     function gzhPay() { 
    $.ajax({ 
        type : "post", 
        url : "__URL__PayController/gzhPay", 
        data : $("#sendform").serialize(), 
        cache : false, 
        dataType : "json", 
        success : function(data) { 
        	wx.config({
    			debug : true, // 开启调试模式,调用的所有api的返回值会在客户端alert出来，若要查看传入的参数，可以在pc端打开，参数信息会通过log打出，仅在pc端时才会打印。
    			appId : 'wx0aaf0e47251fabc5', // 必填，公众号的唯一标识
    			timestamp : '123', // 必填，生成签名的时间戳 timestamp
    			nonceStr : '123', // 必填，生成签名的随机串nonceStr
    			signature : '123',// 必填，签名，见附录1
    			jsApiList : [ 
    				'chooseWXPay', 
    			]
    		// 必填，需要使用的JS接口列表，所有JS接口列表见附录2
    		});
        	
    			wx.chooseWXPay({
    				"appId":"wx0aaf0e47251fabc5"
    					,"timeStamp":"1524153855"
    					,"nonceStr":"a26c6b320f75791bc960d9a3c9bfb285"
    					,"package":"prepay_id=wx20000415008460a29c0d9dec2673948417"
    					,"signType":"MD5"
    					,"paySign":"132D9372A89F59DAE4591B4320FD8084"
    				success: function (res) {
    				// 支付成功后的回调函数
    				}
    				});
    		
        }, 
        error : function(data) { 
            alert("发布失败！"); 
        } 
    }); 
} 

     function onBridgeReady(data){
    WeixinJSBridge.invoke(
        'getBrandWCPayRequest', 
        {
        	"appId":data.appId,
        	"timeStamp":data.timeStamp,
        	"nonceStr":data.nonceStr,
        	"package":data.package2,
        	"signType":data.signType,
        	"paySign":data.paySign
        },	
        function(res){    
            if(res.err_msg == "get_brand_wcpay_request:ok" ) {
                location.href="__URL__ShowController/showSuccess";
            }   // 使用以上方式判断前端返回,微信团队郑重提示：res.err_msg将在用户支付成功后返回    ok，但并不保证它绝对可靠。
        }
    );
 }

     
     
     
if (typeof WeixinJSBridge == "undefined"){
    if( document.addEventListener ){
        document.addEventListener('WeixinJSBridgeReady', onBridgeReady, false);
    }else if (document.attachEvent){
        document.attachEvent('WeixinJSBridgeReady', onBridgeReady);
        document.attachEvent('onWeixinJSBridgeReady', onBridgeReady);
    }
 }else{
    onBridgeReady();
 }
      </script>  
  <!--商家卡片--> 
  <div class="baika">
   <div class="baika2">
    <div class="tubaika">
     <img src="http://47.93.11.60/zfshlm/public/upload/{$date.imgurl}" height="280">
    </div>
     <div class="xxbaika">
      <h1>{$date.store_name}</h1>
       <h5><span><img src="http://__IMG__/phone2.png" width="35" style="margin-right:3px; margin-bottom:-3px;"></span><a href="tel:{$date.phone}">{$date.phone}</a></h5>
       <h5><span><img src="http://__IMG__/location.png" width="35" style="margin-right:3px; margin-bottom:-3px;"></span>{$date.address}</h5>
       <!-- <h5><span><i style="margin-right:3px; margin-bottom:-8px;">¥</i></span>人均：56元</h5>  -->
     </div>
   </div>
<div class="yhshuru"><!-- action="__URL__v1.PayController/gzhPay" -->
  <form id="sendform" style="margin-top:30px; margin-left:15px; float:left;"  method="post" onSubmit="return login()">
  <div style="float:left; font-size:50px; font-weight:400; margin-top:10px;">消费总额 ¥</div>
   <input  required="required"  step="0.01" min="0.01" maxlength="4" style="float:left; height:70px; font-size:50px; margin-top:7px; margin-left:20px; outline:none; border:none;" type="number" placeholder="询问店员后输入" id="guangbiao" onKeyUp="copyob1toob2()" name="moneyNum">
     <input type="hidden" name="store_name" value={$date.store_name} >
  <div style=" border-bottom:1px dashed #7a8076; width:100%; float:left; margin-top:35px;"></div>  
  <h1 style="color:#a6a89b; font-size:60px; font-weight:bold; float:left; margin-left:295px; height:200px;">¥<span style="font-size:130px; vertical-align:-40px;" id="tongbu">0.00</span></h1>
  <button style="padding-left:70px; padding-right:70px; float:left; font-size:65px; color:white; background:#91b6f1; padding-left:100px; padding-right:100px; margin-left:230px; border:none; outline:none; border-radius:5px; margin-top:-20px;" type="button" onclick="gzhPay();">确认支付</button>
 </form>
 
</div>
 <script>
function $(el){
return typeof el == 'string' ? document.getElementById(el) : el;
}
$("guangbiao").focus();
$('guangbiao') .onkeyup = function(){
if( this.value.length > 4 ){
$('tongbu').innerHTML =  this.value.substring(0,4) + '..';
}else{
$('tongbu').innerHTML = this.value;
    }  
  }       
</script> 
<script src="http://__JS__/jquery.js"></script>
<script src="http://__THEMES__/js/aui.js"></script>  
</body>
</html>
